﻿@model IEnumerable<Recuper>
@{
    ViewBag.Title = "历次住院信息";
    ViewBag.Back = "/";
}


<style>

</style>


<div data-role="navbar">
    <ul>
        <li>@Html.ActionLink("基本信息", "Me")</li>
        <li class="site-nav-active">@Html.ActionLink("历次住院", "MyEnhosp", null, new { @class = "ui-btn-active site-nav-active" })</li>
    </ul>
</div>
<!-- /navbar -->

<div data-role="collapsible-set" data-inset="false" data-corners="false">
    @foreach (var rec in Model.OrderByDescending(v => v.EnHospDay))
    {
        <div data-role="collapsible" data-collapsed-icon="info">
            <h3>@(rec.EnHospDay.ToString("yyyy年M月") + "-" + rec.Hospital.HospCode) 住院记录</h3>

            @*<div class="editor-label">
                @Html.LabelFor(model => rec.Doctor.UserName)
            </div>
            <div class="editor-field">
                @Html.DisplayFor(model => rec.Doctor.UserName)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => rec.ZhuYuanYiSheng)
            </div>
            <div class="editor-field">
                @Html.DisplayFor(model => rec.ZhuYuanYiSheng)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => rec.SuiFangLeiXing)
            </div>
            <div class="editor-field">
                @Html.DisplayFor(model => rec.SuiFangLeiXing)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => rec.ZhenDuanS)
            </div>
            <div class="editor-field">
                @Html.DisplayFor(model => rec.ZhenDuanS)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => rec.ShouShuS)
            </div>
            <div class="editor-field">
                @Html.DisplayFor(model => rec.ShouShuS)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => rec.BeiZhu)
            </div>
            <div class="editor-field">
                @Html.DisplayFor(model => rec.BeiZhu)
            </div>
            <div class="editor-label">
                @Html.Label("记录类型？")
            </div>
            <div class="editor-field">
                @(rec.GuoQi ? "仅住院记录，不用于随访。" : "住院记录并用于随访")
            </div>*@
            <div class="editor-label">
                @Html.LabelFor(model => rec.BingQu)
            </div>
            <div class="editor-field">
                @Html.DisplayFor(model => rec.BingQu.Title)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => rec.Department)
            </div>
            <div class="editor-field">
                @Html.DisplayFor(model => rec.Department.DepName)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => rec.BingAnHao)
            </div>
            <div class="editor-field">
                @Html.DisplayFor(model => rec.BingAnHao)
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => rec.EnHospDay)
            </div>
            <div class="editor-field">
                @if (rec.EnHospDay != DateTime.MinValue)
                {
                    @rec.EnHospDay.ToString("yyyy-MM-dd")
                }
                else
                {
                    @("不详")   
                }
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => rec.ZhuYuanYiSheng)
            </div>
            <div class="editor-field">
                @if (!String.IsNullOrEmpty(rec.ZhuYuanYiSheng))
                {
                    @Html.DisplayFor(model => rec.ZhuYuanYiSheng)
                }
                else
                {
                    @("不详")   
                }
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => rec.ShouShuS)
            </div>
            <div class="editor-field">
                @if (!String.IsNullOrEmpty(rec.ShouShuS))
                {
                    @Html.DisplayFor(model => rec.ShouShuS)
                }
                else
                {
                    @("不详")   
                }
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => rec.BeiZhu)
            </div>
            <div class="editor-field">
                @if(!String.IsNullOrEmpty(rec.BeiZhu))
                {
                    @Html.DisplayFor(model => rec.BeiZhu)
                }
                else
                {
                    @("无")   
                }
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => rec.ZhenDuanS)
            </div>
            <div class="editor-field">
                @if (!String.IsNullOrEmpty(rec.ZhenDuanS))
                {
                    @Html.DisplayFor(model => rec.ZhenDuanS)
                }
                else
                {
                    @("不详")
                }
            </div>
            <div class="editor-label">
                @Html.LabelFor(model => rec.DeHospDay)
            </div>
            <div class="editor-field">
                @if (rec.DeHospDay != DateTime.MinValue)
                {
                    @rec.DeHospDay.ToString("yyyy-MM-dd")
                }
                else
                {
                    @("不详")   
                }
            </div>
            
            <div class="editor-label">
                @Html.LabelFor(model => rec.Doctor)
            </div>
            <div class="editor-field">
                @Html.DisplayFor(model => rec.Doctor.UserName)
            </div>            
        </div>

    }



</div>


@section scripts
{

    <style>
        .ui-mobile fieldset {
            margin: 0 1em 0 1em;
        }

        .editor-label, .editor-field {
            line-height: 2em;
            padding: 0 1em 0 1em;
            min-width: 64px;
            width:100%;
            margin-left:-15px;
            /*border-bottom: 1px dotted #eaeaea;*/
            /*border-top: 2px solid white;*/
            /*height: 40px;*/
        }

        .editor-label {
            /*float: left;*/
            background-color: #f1f1f1;
            background-image:url(/Content/Images/vertical-red.png);
            background-repeat:no-repeat;
            /*clear: left;*/
            font-weight: bold;
            line-height: 2em;
        }

        .editor-field {
            /*float: left;*/
            clear: right;
            background-color: white;
            font-size: .8em;
        }
    </style>

    <script type="text/javascript">
    </script>
}